//package com.face.console.tools.config;
//
//import com.face.console.tools.filter.JwtInterceptorFilter;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * @author Liudehua
// * @explain 配置拦截器,用于校验所匹配请求路径是否拦截
// * @date 2021/01/29 9:52
// */
//
////@Configuration
//public class WebConfig implements WebMvcConfigurer {
//    /**
//     * 添加拦截器
//     */
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        //拦截路径可自行配置多个 可用 ，分隔开
////        registry.addInterceptor(new JwtInterceptorFilter()).addPathPatterns("/**")
////        .excludePathPatterns(//排除不拦截的路径
////                "/face/api/user/list",
////                "/**/*.html",
////                "/**/*.js",
////                "/**/*.css"
////        );
//
////        registry.addInterceptor(new JwtInterceptorFilter()).addPathPatterns("/face/api/menu/list","/face/api/menu/{id}/list");
//    }
//    /**
//     * 跨域支持 已在CorsConfigFilter类中实现
//     *
//     * @param registry
//     */
////    @Override
////    public void addCorsMappings(CorsRegistry registry) {
////        registry.addMapping("/**")
////                .allowedOrigins("*")
////                .allowCredentials(true)
////                .allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS", "HEAD")
////                .maxAge(3600 * 24);
////    }
//}
